package com.hxzy.springbootrocketconsumer.service;

import com.hxzy.springbootrocketconsumer.dto.User;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * 消费者消费
 * @author Fan
 */
@Service
@RocketMQMessageListener(topic = "RLT_DEMO_TOPIC",  consumerGroup = "consumer_string")
public class ConsumerStringService implements RocketMQListener<String> {


    @Override
    public void onMessage(String str) {
        System.out.println("字符串："+str);
    }

}
